package com.vastcom.service;

import java.util.List;

import com.vastcom.model.Resource;
import com.vastcom.model.Role;
import com.vastcom.model.Roleresource;
import com.vastcom.model.Users;

public interface RcService {
	
	//用户表
	public boolean addUser(Users u);
	public boolean deleteUser(Users u);
	public Users getUser(Users u);
	public Users getUserById(String id);
	public Users getUserByUsernameAndPassword(String username,String pass);
	public Users getUserByUsername(String username);
	public List<Users> getUsersByDept(String deptid);
	public List<Users> getUsersByRole(String roleid);
	public boolean updateUser(Users user);
	
	//角色表
	public boolean addRole(Role role);
	public boolean deleteRole(Role role);
	public boolean updateRole(Role role);
	public Role getRole(Role role);
	public String getRoleNameById(String roleid);
	public List<Role> getRoleList(int start,int num);
	public List<Role> getRoleList();
	
	//资源表
	public boolean addResource(Resource resource);
	public boolean deleteResource(Resource resource);
	public boolean updateResource(Resource resource);
	public Resource getResource(Resource resource);
	public List<Resource> getResourceListByType(String type);
	public String getResourceIdByPath(String path);
	//角色资源表
	
	public boolean addRoleresource(Roleresource roleresource);
	public boolean deleteRoleresource(Roleresource roleresource);
	public boolean hasResource(String roleid,String resourceid);
	
	
	
	
	

}
